package com.lengxf.kafka.admin;

import org.apache.kafka.clients.admin.AdminClient;
import org.apache.kafka.clients.admin.KafkaAdminClient;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
@SuppressWarnings("all")
public class AdminConfig {

    @Bean
    public AdminClient init(KafkaProperties kafkaProperties) {
        return KafkaAdminClient.create(kafkaProperties.buildAdminProperties());
    }

}
